#include <iostream>
using namespace std;

int main() {
	int arr[25][26] = { 0 };
	arr[0][1] = 1;
	int length = 10;
	cin >> length;
	cout << arr[0][1] << endl;
	for (int i = 1; i < length; i++) {
		for (int j = 1; j < i + 2; j++) {
			arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j] ;
			cout << arr[i][j] << " ";
		}
		cout << endl;
	}

}
